net/http.transferWriter.ContentLength (field)
20 uses
net/http (current package)
transfer.go#L64: ContentLength int64 // -1 means unknown, 0 means exactly none
transfer.go#L93: t.ContentLength = rr.outgoingLength()
transfer.go#L94: if t.ContentLength < 0 && len(t.TransferEncoding) == 0 && t.shouldSendChunkedRequestBody() {
transfer.go#L104: if t.ContentLength != 0 && !isKnownInMemoryReader(t.Body) {
transfer.go#L116: t.ContentLength = rr.ContentLength
transfer.go#L129: t.ContentLength = -1
transfer.go#L136: t.ContentLength = -1
transfer.go#L138: t.ContentLength = 0
transfer.go#L171: if t.ContentLength >= 0 || t.Body == nil { // redundant checks; caller did them
transfer.go#L225: t.ContentLength = 0
transfer.go#L256: if t.ContentLength > 0 {
transfer.go#L259: if t.ContentLength < 0 {
transfer.go#L266: if t.ContentLength == 0 && isIdentity(t.TransferEncoding) {
transfer.go#L293: if _, err := io.WriteString(w, strconv.FormatInt(t.ContentLength, 10)+"\r\n"); err != nil {
transfer.go#L297: trace.WroteHeaderField("Content-Length", []string{strconv.FormatInt(t.ContentLength, 10)})
transfer.go#L363: } else if t.ContentLength == -1 {
transfer.go#L370: ncopy, err = t.doBodyCopy(w, io.LimitReader(body, t.ContentLength))
transfer.go#L389: if !t.ResponseToHEAD && t.ContentLength != -1 && t.ContentLength != ncopy {
transfer.go#L391: t.ContentLength, ncopy)
|
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |